package com.spj.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author :spj
 * @Date:2022/4/1
 * @description:
 */
@RequestMapping("/rest")
@RestController
public class RestfulTest {
    @GetMapping("/test")
    public String demo1() {
        return "str";
    }
    @PostMapping("/test")
    public String demo2(@RequestBody String str) {
        return str;
    }
    @PutMapping("/test")
    public String demo3(@RequestBody String str) {
        return str;
    }
    @DeleteMapping("/test/{str}")
    public String demo4(@PathVariable String str) {
        return str;
    }
}
